import axios from '../axios'

export const findById = (id) => {
  return axios({
    url: '/element/' + id,
    method: 'get'
  })
}

export const modifyElement = (data) => {
  return axios({
    url: '/element/updateElement',
    method: 'post',
    data
  })
}

export const addNewElement = (data) => {
  return axios({
    url: '/element/',
    method: 'post',
    data
  })
}

// 分页查询
export const query = (params) => {
  return axios({
    url: '/element/',
    method: 'get',
    params
  })
}

// 根据casNo获取元素的水溶解度和饱和蒸气压
export const getInforamtion = (params) => {
  return axios({
    url: '/element/information',
    method: 'post',
    params
  })
}
// 删除元素
export const delById = (id) => {
  return axios({
    url: '/element/' + id,
    method: 'delete'
  })
}
